package com.zaydanwu.cla.service.Impl;

import com.zaydanwu.cla.dao.NewsMapper;
import com.zaydanwu.cla.model.News;
import com.zaydanwu.cla.service.NewsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wzo
 * @since 2.0.0 2018-12-13
 */
@Service
public class NewsServiceImpl implements NewsService {

    @Resource
    private NewsMapper newsMapper;

    @Override
    public List<News> getAllNews() {
        return newsMapper.getAllNews();
    }

    @Override
    public int saveNews(News news) {
        return newsMapper.insert(news);
    }
}
